﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Test.Repository.Interfaces.Base;
using Test.Models.Interfaces;
using Test.Models;
using MvcMiniProfiler;

namespace Test.Repository.Base
{
    public class RepositoryBase : IRepositoryBase
    {
        readonly DB _db;
        public DB db 
        { 
            get
            {
                return _db;
            }
        }

        public RepositoryBase(DB _db)
        {
            var profiler = MiniProfiler.Current;

            using (profiler.Step("Repository Base Constructor"))
            {
                this._db = _db;
            }
        }

        public void Save()
        {
            _db.SaveChanges();
        }
    }
}